const scoreSQL = {
  queryAll: 'select * from score',   // 查询所有分数
  queryByName: 'select * from score where user_name=?',  //用户名返回分数
  insert: 'insert into score set ?',  // 插入分数
  deleteComment: 'delete from score where id=?', // 删除分数
  selectTop10: 'select * from score s1 where (select count(0) from score s2 where s1.score<s2.score)<10 ORDER BY score DESC',//选取分数前十的记录
  selectHead: 'select * from `user` s3 inner join (select * from score s1 where (select count(0) from score s2 where s1.score<s2.score)<10 ORDER BY score DESC) as a on s3.username = a.user_name '
}

module.exports = scoreSQL